<template>
    <p>电影{{ id }}</p>
    <button @click="goBack">后退</button>
</template>

<script setup>
    import { useRoute } from 'vue-router';
    const props = defineProps({id: String})
    const router = useRoute()
    const goBack = () => {
        router.go(-1)
    }
</script>